package com.zzm.validate.web;

import java.util.HashMap;
import java.util.Map;

import org.junit.Test;

public class SimpleFormValidatorTest {

	@Test
	public void testValidate() throws Exception {
		Map<String, String> bean = new HashMap<String, String>();

		bean.put("username", "123");
		bean.put("age", "-1");
		bean.put("birth", "1988-02-32");
		bean.put("email", "123");
		
		FormValidator validator = new ValidateConfig().buildFormValidator();
		
		System.out.println(validator.validate("nameForm", bean, null));
	}
}
